<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>所有商品</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/shop.css">
</head>
<body>
    <div class="dropdown" id="mydropdown">
        <button class="btn btn-default btn-block dropdown-toggle" type="button" data-toggle="dropdown">
            默认排序<span class="caret"></span>
        </button>
        <ul class="dropdown-menu" role="menu">
            <li><a href="#">销量从高到低</a></li>
            <li class="divider"></li>
            <li><a href="#">价格从高到低</a></li>
            <li class="divider"></li>
            <li><a href="#">价格从低到高</a></li>
            <li class="divider"></li>
            <li><a href="#">评价从高到低</a></li>
        </ul>
    </div>
    <!-- 商品列表 -->
    <div class="container-fluid">
        <div class="goodslist row">
            <c:forEach items="${goodsList.datas}" var="goods">
                <div class="col-xs-6 col-md-3">
                    <a href="${goods.id}/single">
                        <div class="thumbnail">
                            <img src="<%=request.getContextPath() %>/resources/images/goodsImages/${goods.image}" alt=""/>
                            <div class="caption">
                                <p class="textflow">${goods.name}</p>
                                <p class="price">￥${goods.price}</p>
                            </div>
                        </div>
                    </a>
                </div>
            </c:forEach>
        </div>
    </div>

    <!-- 底部菜单 -->
    <nav id="indexnav" class="navbar navbar-inverse navbar-fixed-bottom">
        <div class="btn-group btn-group-justified">
            <a class="btn btn-inverse" href="index">
                <span class="glyphicon glyphicon-home"></span>
                <p>首页</p>
            </a>
            <a class="btn btn-inverse" href="usercenter">
                <span class="glyphicon glyphicon-user"></span>
                <p>个人中心</p>
            </a>
            <a class="btn btn-inverse" href="cart">
                <span class="glyphicon glyphicon-shopping-cart"></span>
                <p>购物车</p>
            </a>
            <a class="btn btn-inverse" href="all">
                <span class="glyphicon glyphicon-th-large"></span>
                <p>所有商品</p>
            </a>
            <a class="btn btn-inverse" id="left-panel-link" href="#left-panel">
                <span class="glyphicon glyphicon-leaf"></span>
                <p>分类</p>
            </a>
        </div>
    </nav>

    <div id="left-panel" class="panel">
        <ul>
            <li><a href="#" class="category">笔记本</a></li>
            <li><a href="#" class="brand">苹果 / Apple</a></li>
            <li><a href="#" class="brand">联想 / Lenovo</a></li>
            <li><a href="#" class="brand">戴尔 / DELL</a></li>
            <li><a href="#" class="brand">惠普 / HP</a></li>
            <li><a href="#" class="category">台式机</a></li>
            <li><a href="#" class="brand">苹果 / Apple</a></li>
            <li><a href="#" class="brand">联想 / Lenovo</a></li>
            <li><a href="#" class="brand">戴尔 / DELL</a></li>
            <li><a href="#" class="brand">惠普 / HP</a></li>
            <li><a href="#" class="category">平板电脑</a></li>
            <li><a href="#" class="brand">苹果 / Apple</a></li>
            <li><a href="#" class="brand">三星 / SAMSUNG</a></li>
            <li><a href="#" class="brand">华为 / HUAWEI</a></li>
            <li><a href="#" class="brand">小米 / MI</a></li>
        </ul>
    </div>

<script src="<%=request.getContextPath() %>/resources/js/jquery-1.11.2.min.js"></script>
<script src="<%=request.getContextPath() %>/resources/js/bootstrap.min.js"></script>
<script src="<%=request.getContextPath() %>/resources/js/jquery.panelslider.js"></script>
<script>
    $('#left-panel-link').panelslider();
</script>
</body>
</html>